<?php
 // Front Controller
 $sad_first_stamp=microtime(true);
 $sad_root       =preg_replace('|/[^/]+$|','',$_SERVER['SCRIPT_FILENAME']);// document root of cms e.g. /var/www/site
 require_once($sad_root.'/functions/core_engine.php');
 require_once($sad_root.'/functions/sql.php');
 require_once($sad_root.'/functions/keyvaluestorage.php');
 require_once($sad_root.'/config.php');
 
 $sad_options->modules_list =array_unique(array_merge($sad_options->modules_list, array(
  'html.php',
  'imagefunctions.php',
  'ip.php',
  'rus.php',
  'sizes.php',
  'utf8.php',
  'xml.php',
  'smartmutex.php',
  'keyvaluestorage-file.php',
  'keyvaluestorage-memcache.php',
 )));

 $sad_engine=new AscetCMSEngine($sad_first_stamp);
 $sad_engine->init($sad_options);
 unset($sad_first_stamp, $sad_options);
 $sad_engine->run();
?>